home *** CD-ROM | disk | FTP | other *** search
/ Enter 2003 January / EnterCD 01_2003.iso / Internet / CuteFTP 3.0 / cuteftppro.exe / Disk1 / data1.cab / Sample_Scripts / Basic_Scripts / removeURL.vbs < prev    next >
Encoding:
Text File  |  2002-11-04  |  1.1 KB  |  34 lines

  1. '=======================================================================
  2. '= File:  RemoveURL.vbs
  3. '= Notes: 
  4. '=   Remove file(s) using wildcard
  5. '=======================================================================
  6.  
  7. Sub RemoveURL()
  8.     Dim fserv
  9.     Set fserv = CreateObject("CuteFTPPro.TEConnection")
  10.  
  11.     ' set some default values for the following prompts
  12.     strHost = "ftp.cuteftp.com"
  13.     strPath = "/pub/cuteftppro/"
  14.     strWCrd = "*.*"
  15.  
  16.     ' ask user for values
  17.     strHost = InputBox("Enter host", "CuteFTP Pro", strHost)
  18.     strPath = InputBox("Enter remote path", "CuteFTP Pro", strPath)
  19.     strWCrd = InputBox("Enter filename to delete (wildcards allowed)", "CuteFTP Pro", strWCrd)
  20.  
  21.     fserv.Host = strHost
  22.     fserv.RemoteFolder = strPath
  23.     nUserChoice = MsgBox ("Remove: " & strHost & strPath & strWCrd & "?", vbYesNoCancel)
  24.     If nUserChoice = vbYes Then
  25.         fserv.RemoteRemove strWCrd
  26.     End if
  27.  
  28. End Sub
  29.  
  30. '=======================================================================
  31. '= Main
  32. '=======================================================================
  33. RemoveURL()
  34.